﻿package mortal.game.proxy
{
    import Message.Game.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.mvc.core.*;

    public class YYZiZuanProxy extends Proxy
    {

        public function YYZiZuanProxy()
        {
            return;
        }// end function

        public function requestGift(param1:int) : void
        {
            if (param1 == EYYPurpleAwardType._EMonthReward)
            {
                rmi.iRolePrx.getYYPurpleReward_async(new AMI_IRole_getYYPurpleReward(this.onGetGift, null, EYYPurpleAwardType._EMonthReward), new EYYPurpleAwardType(EYYPurpleAwardType._EMonthReward));
            }
            else if (param1 == EYYPurpleAwardType._EYearReward)
            {
                rmi.iRolePrx.getYYPurpleReward_async(new AMI_IRole_getYYPurpleReward(this.onGetGift, null, EYYPurpleAwardType._EYearReward), new EYYPurpleAwardType(EYYPurpleAwardType._EYearReward));
            }
            return;
        }// end function

        private function onGetGift(param1:AMI_IRole_getYYPurpleReward) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.YYZiZuanReceiveGift, int(param1.userObject)));
            return;
        }// end function

    }
}
